﻿<%@ control language="C#" autoeventwireup="true" inherits="AdminToolbar, MCWF" %>
<%@ Register Assembly="MetaBuilders.WebControls" Namespace="MetaBuilders.WebControls"
    TagPrefix="mb" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<script type="text/javascript">
    function ConfirmDelete()
    {
        var agree=confirm("Bạn có chắc muốn xóa bản ghi được lựa chọn ?");
        if (agree) return true;
        else return false; 
    }       

   function OnClientButtonClickingHandler(sender, eventArgs)
   {
        if(eventArgs.get_item().get_value()=="DeleteRecords")
        {
            eventArgs.set_cancel(true);
            var agree=confirm("Bạn có muốn xóa bản ghi được lựa chọn?");
            if (agree) eventArgs.set_cancel(false);
            else eventArgs.set_cancel(true); 
        }
   }
</script>

<table border="0" cellpadding="0" cellspacing="0" width="790px" height="50px" class="ToolbarStyle">
    <tr>
        <td valign="middle" align="left" width="440px">
            <table border="0" cellpadding="0" width="100%" cellspacing="0" height="50px">
                <tr>
                    <td width="10px">
                        &nbsp;
                    </td>
                    <td align="left" class="ToolbarText" valign="middle">
                        &nbsp;<asp:Label ID="lblFunctionTitle" runat="server">TÊN CHỨC NĂNG</asp:Label>
                        <asp:Label ID="lblControlState" runat="server" Visible="false">NOMAL</asp:Label>
                    </td>
                    <td width="10px">
                        &nbsp;
                    </td>
                </tr>
            </table>
        </td>
        <td align="right" valign="middle">
            <telerik:RadToolBar ID="rtbToolbar" runat="server" EnableEmbeddedSkins="false" Skin="MCWFToolBarSkin"
                OnButtonClick="rtbToolbar_ButtonClick" BorderWidth="0px" OnClientButtonClicking="OnClientButtonClickingHandler">
                <Items>
                    <telerik:RadToolBarButton ImageUrl="~/Images/icons/new.png" Text="Tạo mới" ToolTip="Tạo mới"
                        ImagePosition="AboveText" CausesValidation="false">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton ImageUrl="~/Images/icons/edit.png" Text="Chỉnh sửa" ToolTip="Chỉnh sửa"
                        ImagePosition="AboveText" CausesValidation="false">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton ImageUrl="~/Images/icons/del.png" Value="DeleteRecords" Text="Xóa" ToolTip="Xóa"
                        ImagePosition="AboveText" CausesValidation="false">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton ImageUrl="~/Images/icons/undo.png" Text="Quay lại" ToolTip="Quay lại"
                        CausesValidation="false" ImagePosition="AboveText">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton ImageUrl="~/Images/icons/save.png" Text="Lưu" ToolTip="Lưu"
                        ImagePosition="AboveText">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton ImageUrl="~/Images/icons/refresh.png" Text="Load lại" ToolTip="Load lại"
                        ImagePosition="AboveText" CausesValidation="false">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton ImageUrl="~/Images/icons/filter.png" Text="Lọc" ToolTip="Lọc"
                        ImagePosition="AboveText" CausesValidation="false">
                    </telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar>
        </td>
    </tr>
</table>
